package www.meng.com.serviceImpl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import www.meng.com.entity.PeopleEntity;
import www.meng.com.mapper.PeopleMapper;
import www.meng.com.service.PeopleService;

import java.util.List;

/**
 * @author : Mr.Yan
 * @program : www.meng.com.serviceImpl
 * @create : 2020/10/20
 * @description : 人员 Impl
 */
@Service
@Transactional
public class PeopleServiceImpl implements PeopleService {

    @Autowired
    public PeopleMapper peopleMapper;

   public List<PeopleEntity> findAll() {
       List<PeopleEntity> all = peopleMapper.all();
        return all;
    }

    @Override
    public List<PeopleEntity> findCustom() {
        return peopleMapper.findMaxAge("18");
    }

}
